import React from "react";
import { BrowserRouter, Route, Routes, NavLink } from "react-router-dom";
import FoodList from "./components/FoodList";
import "./style/variables.less";

import Home from "./views/Home";
import Ask from "./views/Ask";
import Video from "./views/Video";
import Mine from "./views/Mine";
import Detail from "./views/Home/Detail";


export default function App() {
  {
    /* 所有的路由配置均在 BrowserRouter 内部 */
  }
  return (
    <BrowserRouter>
      <div className="app-container">
        {/* 使用 Routes 替换曾经的 Switch */}
        <Routes>
          <Route path="/" element={<Home />} />
          <Route path="/ask" element={<Ask />} />
          <Route path="/video" element={<Video />} />
          <Route path="/mine" element={<Mine />} />
          <Route path="/detail/:art_id" element={<Detail />} />
        </Routes>
      </div>

      {/* 底部导航栏 */}
      <FoodList />
    </BrowserRouter>
  );
}
